/********************************************************************
Name: Table A16: Effect of Dem Sheriff on Detainer Compliance Rate
Author: Dan Thompson
Date: August 2019
Notes:
********************************************************************/

* Set the working directory 
gl root = "$sanctuary_root"
gl root = "YOUR_WORKING_DIRECTORY"

* Bring in the RD analysis data
use "$root/data/rd analysis data.dta", clear

* Column 1
reg share_detained_sheriff treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg share_detained_sheriff treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 2
reg share_detained_crime0 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg share_detained_crime0 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 3
reg share_detained_crime3 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg share_detained_crime3 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 4
reg share_detained_crime2 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg share_detained_crime2 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)

* Column 5
reg share_detained_crime1 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25, vce(clust election_id)
reg share_detained_crime1 treat rv rv2 rv3 treat_rv treat_rv2 treat_rv3 ///
	if abs(rv)<25 & large==1, vce(clust election_id)
